<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition>
	<h:outputText value="System error:Order model current is null"
		rendered="#{orderModel.current==null}" />
	<h:panelGrid rendered="#{orderModel.current!=null}">
		<p:dataTable var="detail" value="#{orderModel.current.orderDetails}"
			rows="20">
			<f:facet name="header">Items</f:facet>
			<p:column headerText="number" sortBy="#{detail.product.number}">
				<h:outputText value="#{detail.product.number}" />
			</p:column>
			<p:column headerText="name" sortBy="#{detail.product.name}">
				<h:outputText value="#{detail.product.name}" />
			</p:column>
			<p:column headerText="Ordered price">
				<h:outputText value="#{detail.orderedPrice}" />
			</p:column>
			<p:column headerText="Ordered QTY" sortBy="#{detail.orderedQuantity}">
				<h:outputText value="#{detail.orderedQuantity}" />
			</p:column>
			<p:column headerText="delivered QTY"
				sortBy="#{detail.deliveredQuantity}">
				<h:outputText value="#{detail.deliveredQuantity}" />
			</p:column>
		</p:dataTable>
	</h:panelGrid>
</ui:composition>
</html>